The present invention relates generally to electronic computers and more particularly to systems for storing data in non-volatile storage such as magnetic media.
The task of organizing data on a storage medium such as a rotating magnetic disk has traditionally been performed by the file system of a host processor. Such a file system, which may be part of an operating system, a database system, or some other application, has more information on the global system state than does a local disk controller. The ability to use such global information offers a theoretical advantage, and for this reason it has generally been believed that the host processor can do a better job of organizing the data on the disk than can the local disk controller.
In practice, detailed knowledge of disk performance characteristics, disk geometry and the like are readily available at the disk-controller level but are not conveniently utilized by the host processor. A system that could take advantage of this type of detailed knowledge would have the potential to provide greatly improved disk performance. Such a system has been proposed in the context of a single spindle disk drive system. This system relies on the disk controller rather than the host processor to organize data on the disk, but its ability to use the detailed knowledge of the disks results in significantly improved performance.
In the proposed system, a small number of segments on the disk, typically not more than about five percent, are reserved as free segments. These free segments are scattered about the surface of the disk. When a block of data is to be written on the disk, the local disk controller selects the nearest free segment to the current head position and writes the data there. This results in very fast writes because there is usually a free segment within a fraction of a revolution of the disk. Writes can be performed in the order in which received without any performance penalty. Also, an update never overwrites the old copy of the data.
An "indirection table " is kept in memory to keep track of where on the disk each block of data is written. A "free map " is used to find free segments efficiently. To allow recovery of the indirection table in case of memory loss, for example due to a power failure, reverse indices are written in the segments on the disk. The reverse indices make it possible to rebuild the indirection table if the one in memory is lost, although this is time-consuming because the entire disk must be read in order to recover all the information. This system significantly improves the performance of disk memory systems.
Despite the improved performance offered by the above-described system, there remains a need for a way to improve the performance of a disk system having a plurality of spindles and to reduce the time required for recovery if system information such as the indirection table is lost from volatile memory.